Imports System.Collections.Generic

Imports System.Web

#Region "using"
Imports System.Data
Imports QUANLY.DAO
Imports QUANLY.DTO
#End Region
Public Class PHUONGTIENBUS
	Private objDAO As PHUONGTIENDAO
	Public Sub New(strPath As [String])
		objDAO = New PHUONGTIENDAO(strPath)
	End Sub

	Public Function SelectAll() As DataSet
		Dim ds As DataSet
		Try
			ds = objDAO.SelectAll()
			Return ds
		Catch e As System.Exception
			Throw New Exception(e.Message, e.InnerException)
		End Try
	End Function

	Public Function SelectByID(id As Integer) As DataSet
		Dim ds As DataSet
		Try
			ds = objDAO.SelectByID(id)
			Return ds
		Catch e As System.Exception
			Throw New Exception(e.Message, e.InnerException)
		End Try
	End Function

	Public Function Insert(obj As PHUONGTIENDTO) As Boolean
		Try
			Return objDAO.Insert(obj)
		Catch
			Return False
		End Try
	End Function

	Public Function Delete(id As Integer) As Boolean
		Try
			Return objDAO.Delete(id)
		Catch
			Return False
		End Try
	End Function

	Public Function Update(obj As PHUONGTIENDTO) As Boolean
		Try
			Return objDAO.Update(obj)
		Catch
			Return False
		End Try
	End Function

End Class
